.block
  .secondary-navigation
    %ul.wat-cf
      %li.first.active=link_to pat(:list), cycles_path
      %li=link_to pat(:new), new_cycle_path
  .content
    %h2.title
      =mt(:cycle)
    .inner
      .group
        Program:
        =link_to @cycle.program.display_name, edit_program_path(@cycle.program)

      .group
        Starting at: 
        =@cycle.start_at

      .group
        Complete?
        =(@cycle.complete? ? 'Y' : 'N')

      .group
        System-Control connections:
        =SystemControl.where(:cycle_id => @cycle).count

        %table.table
          %tr
            %th Control
            %th System
            %th State
          -SystemControl.where(:cycle_id => @cycle).each do |sc|
            %tr
            %td=link_to sc.control.display_name, sc.control
            %td=link_to sc.system.display_name, sc.system
            %td=mt(sc.state)
